cmake_minimum_required(VERSION 3.14)
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

project(ComputationalMethods LANGUAGES CXX)
set(CMAKE_BUILD_TYPE Release)
set(GUI_TYPE "")
if (APPLE)
    set(GUI_TYPE MACOSX_BUNDLE)
elseif (WIN32)
    set(GUI_TYPE WIN32)
endif ()


#set(CMAKE_PREFIX_PATH  C:/Qt/5.15.2/msvc2019_64/lib/cmake)
set(CMAKE_PREFIX_PATH C:/Qt/5.15.1/msvc2019-x86_64-static/lib/cmake)

find_package(Qt5 COMPONENTS Core Widgets PrintSupport REQUIRED)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)


set(CMAKE_INCLUDE_CURRENT_DIR ON)

include_directories(thirdparty/)
aux_source_directory(. PROJECT_SOURCES)

set(PROJECT_SOURCES ${PROJECT_SOURCES} thirdparty/QCustomPlot/qcustomplot.cpp computational-methods.rc)

add_executable(ComputationalMethods ${GUI_TYPE} ${PROJECT_SOURCES})

target_link_libraries(ComputationalMethods Qt5::Core Qt5::Widgets Qt5::PrintSupport)
